#!/usr/bin/env python
import json

def example_inventory():
    d = {
        'app': {
            'hosts': ['192.168.1.12'],
            'vars': {
                'ansible_ssh_user' : 'root',
                'deploy_dir' : '/tmp/deploy'
            }
        },
    }
    return d

print json.dumps(example_inventory())